From 563d90cfb9a25743ac1dac9a7f5c377eeaf69686 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20H=C3=A4rdeman?= Date: Thu, 23 Oct 2025 19:02:33 +0200 Subject: [PATCH] luci-mod-network: add an "IPv4 Settings" tab to interfaces MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit And add one option to disable/enable odhcpd's DHCPv4 support. Signed-off-by: David Härdeman --- .../luci-static/resources/view/network/interfaces.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js index 8b49f5a720..29fe309828 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js @@ -669,6 +669,7 @@ return view.extend({ ss.tab('general', _('General Setup')); ss.tab('advanced', _('Advanced Settings')); + ss.tab('ipv4', _('IPv4 Settings')); ss.tab('ipv6', _('IPv6 Settings')); ss.tab('ipv6-ra', _('IPv6 RA Settings')); @@ -704,6 +705,16 @@ return view.extend({ ss.taboption('general', form.Flag, 'ignore', _('Ignore interface'), _('Disable DHCP for this interface.')); if (protoval == 'static') { + if (L.hasSystemFeature('odhcpd')) { + so = ss.taboption('ipv4', form.RichListValue, 'dhcpv4', _('DHCPv4 Service'), + _('Enable or disable DHCPv4 services on this interface (odhcpd only).')); + so.optional = true; + so.value('', _('disabled'), + _('Do not provide DHCPv4 services on this interface.')); + so.value('server', _('enabled'), + _('Provide DHCPv4 services on this interface.')); + } + so = ss.taboption('general', form.Value, 'start', _('Start', 'DHCP IP range start address'), _('Lowest leased address as offset from the network address.')); so.optional = true; so.datatype = 'or(uinteger,ip4addr("nomask"))'; -- 2.30.2